/**
 * Copyright (c) Enalean, 2018. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

.git-repository-card {
    transition: border 200ms;
    cursor: pointer;

    &:hover {
        border: 1px solid $tlp-theme-color;
    }
}

.git-repository-card-two-columns {
    width: calc(50% - #{$tlp-half-spacing});
    margin: 0 $tlp-half-spacing $tlp-spacing 0;

    &:nth-child(2n) {
        margin: 0 0 $tlp-spacing $tlp-half-spacing;
    }
}

@media screen and (max-width: 1200px) {
    .git-repository-card-two-columns {
        width: 100%;
        margin: 0 0 $tlp-spacing;

        &:nth-child(2n) {
            margin: 0 0 $tlp-spacing;
        }
    }
}

.git-repository-card-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    &:hover {
        text-decoration: none;
    }

    > .tlp-pane-section {
        padding-top: 0;
    }
}

.git-repository-card-header {
    display: flex;
    flex: 0 1 auto;
    align-items: baseline;

    &:not(:only-child) {
        padding: $tlp-spacing $tlp-spacing $tlp-half-spacing;
    }
}

.git-repository-card-title {
    color: $tlp-theme-color;
    font-size: 16px;
    font-weight: normal;
    text-transform: none;
    word-break: break-all;
}

.git-repository-card-path {
    display: block;
    font-size: 14px;
}

.git-repository-card-last-update-icon {
    font-size: 12px;
}

.git-repository-card-last-update {
    margin: 0 $tlp-half-spacing 0 0;
    color: $tlp-ui-dimmed;
    font-size: 14px;
}

.git-repository-card-description {
    color: $tlp-ui-dimmed;
    font-size: 14px;
    line-height: 20px;
}

.git-pullrequest-badge {
    margin: 0 $tlp-spacing 0 0;
    background-color: $tlp-theme-color;
}

.git-pullrequest-badge-link {
    transition: opacity 100ms;
    color: $tlp-ui-white;

    &:hover {
        opacity: .7;
    }
}

.git-repository-card-admin-link {
    position: relative;
    top: 1px;
    transition: color 100ms, opacity 100ms;
    opacity: .2;
    color: $tlp-ui-dimmed;

    &:hover {
        opacity: 1;
        color: $tlp-theme-color;
    }
}
